<template>
	<view class="cu-card article no-card margin-sm radius">
		<view class="cu-item shadow solid-bottom padding-sm" v-for="(item, index) in goodsList" :key="index">
			<navigator class="flex" hover-class="none" :url="'/pages/goods/goods-detail/index?id=' + item.id">
				<view class="content" style="padding:0rpx">
					<image :src="item.spuUrls[0]" mode="aspectFill"></image>
					<view class="desc">
						<view class="hx-overflow-2"> {{item.name}}</view>
						<view>
							<text class="text-price text-xl" :class="'text-'+theme.themeColor">{{item.lowPrice}}</text>
							<text v-if="item.highPrice != item.lowPrice" class="text-sm text-white"
								:class="'text-'+theme.themeColor">
								起
							</text>
							<view>已售{{getSalesVolume(item.salesVolume)}}</view>
						</view>
					</view>
				</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	import utils from '@/utils/index'
	export default {
		components: {},
		data() {
			return {
				theme: getApp().globalData.theme,
			};
		},

		components: {},
		props: {
			goodsList: {
				type: Array,
				default: () => []
			}
		},
		computed: {

		},
		methods: {
			getSalesVolume(value) {
				return utils.numberToWan(value);
			},
		},
	};
</script>
<style lang="scss" scoped>

</style>
